<div class="tournaments view">
<h2><?php  __('Tournament');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $tournament['Tournament']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $tournament['Tournament']['name']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Date'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $tournament['Tournament']['date']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Location'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $tournament['Tournament']['location']; ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('Edit Tournament', true), array('action' => 'edit', $tournament['Tournament']['id'])); ?> </li>
		<li><?php echo $html->link(__('Delete Tournament', true), array('action' => 'delete', $tournament['Tournament']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $tournament['Tournament']['id'])); ?> </li>
		<li><?php echo $html->link(__('List Tournaments', true), array('action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New Tournament', true), array('action' => 'add')); ?> </li>
		<li><?php echo $html->link(__('List Registrations', true), array('controller' => 'registrations', 'action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New Registration', true), array('controller' => 'registrations', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Related Registrations');?></h3>
	<?php if (!empty($tournament['Registration'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Tournament Id'); ?></th>
		<th><?php __('Email'); ?></th>
		<th><?php __('Church Name'); ?></th>
		<th><?php __('Coach Name'); ?></th>
		<th><?php __('Phone'); ?></th>
		<th><?php __('Number For Lunch'); ?></th>
		<th><?php __('Number Of Seats'); ?></th>
		<th><?php __('Housing Notes'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($tournament['Registration'] as $registration):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $registration['id'];?></td>
			<td><?php echo $registration['tournament_id'];?></td>
			<td><?php echo $registration['email'];?></td>
			<td><?php echo $registration['church_name'];?></td>
			<td><?php echo $registration['coach_name'];?></td>
			<td><?php echo $registration['phone'];?></td>
			<td><?php echo $registration['number_for_lunch'];?></td>
			<td><?php echo $registration['number_of_seats'];?></td>
			<td><?php echo $registration['housing_notes'];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller' => 'registrations', 'action' => 'view', $registration['id'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller' => 'registrations', 'action' => 'edit', $registration['id'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller' => 'registrations', 'action' => 'delete', $registration['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $registration['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('New Registration', true), array('controller' => 'registrations', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
